package com.insurance.service.enums;

import org.apache.commons.lang3.StringUtils;

/**
 * 标的是否批改枚举类
 */
public enum BidSubjectCorrectingStateEnum {

    IS_NOT_CORRECTING("0", "未批改"),
    IS_CORRECTING("1", "已批改");

    private String code;

    private String message;


    BidSubjectCorrectingStateEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public static String getMsg(String code){
        if(StringUtils.isBlank(code)){
            return "";
        }
        BidSubjectCorrectingStateEnum[] values = values();
        for (BidSubjectCorrectingStateEnum bidSubjectCorrectingStateEnum : values) {
            if(code.equals(bidSubjectCorrectingStateEnum.getCode())){
                return bidSubjectCorrectingStateEnum.getMessage();
            }
        }
        return "";
    }

}
